-
Notifications
You must be signed in to change notification settings - Fork 522
Fix space available widget - ref #6719 #6896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
… it to the repository
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files in src/CoreBundle/Migrations should not be modified in this PR. Please remove them or close this PR to open a new one without these.
See other change requests. Many small things to change, but overall a very good job code-wise (haven't tried running it yet).
| public function __invoke($cid): JsonResponse | ||
| { | ||
| $courseId = (int) $cid; | ||
| $sessionId = api_get_session_id(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use CidReqHelper::getSessionId() for $sessionId and CidReqHelper::getGroupId() for $groupId.
| return new JsonResponse(['error' => 'Course not found'], 404); | ||
| } | ||
|
|
||
| $sessionEntity = api_get_session_entity(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use CidReqHelper::getSessionEntity()
| } | ||
|
|
||
| // Path filtering - convert document.lib.php logic to Doctrine | ||
| if ('/' !== $path) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like the old files strategy of looking at file paths to define hierarchies. This is not the way this should be done in Chamilo 2.0. Rather, you should use ResourceFile and ResourceNode entities for that (ask if you need more details)
Hi !
I refactored the code and implemented the space chart based on Chamilo v1.
I also added the ability to view other teachers’ spaces (it just felt right somehow).
I’m not sure if it works with groups, since I couldn’t find where to test that — hopefully someone can check! Theoretically, it should 😆
I hope my code is fine !
Issue : #6719
Screens :

If error :

(It is centered, I fixed it in the commit
Minor— I just took the screenshot before noticing it wasn’t.)